import axios from '@/utils/api'
import { reactive } from "vue";
import { useUserInfoStore } from '@/store/modules/user_info/index';
const user_infoStore = useUserInfoStore();
const user_info = reactive(user_infoStore.userInfo)
export const useCreatePlay = (param,game_id)=>{
    console.log(param,'paramparam');
    
    const data = {
        userId: user_info.id,
        gameId:game_id,
        roleId: param.Roleid,
        serverId: param.Serverid.toString(),
        cText: param.Ctext,
        cp_orderId:param.Cp_orderid,
        sku: param.Sku
    }
    console.log(data);
    
    const res = axios.post('/gameRecharge',data)
    
    return res
}